
import 'package:flutter_plugin_sdk_storekit/channel/store_kit_channel_plugin.dart';

class MyStoreKitCallback implements StoreKitCallback {
  @override
  void onProductsReceived(List<Map<String, dynamic>> products) {
    // 收到产品列表
    print(products);
  }

  @override
  void onSubscriptionUpdated(
    bool isSubscribed,
    Map<String, dynamic> orderData,
    Map<String, dynamic> reportRequestData,
    Map<String, dynamic> product,
  ) {
    // 订阅状态更新
    print("isSubscribed: $isSubscribed");
    print("orderData: $orderData");
    print("reportRequestData: $reportRequestData");
    print("product: $product");
  }

  @override
  void onNoSubscriptionUpdated() {
    // 没有订阅
    print("No subscription available.");
  }
  
  @override
  void getSubscriptionHistoryOrder(List<Map<String, dynamic>> orderData) {
     //历史订单
    print(orderData);
  }
}
